#ifndef YZJREADER_H
#define YZJREADER_H

#include <QIcon>
#include <QXmlStreamReader>
#include <QList>

QT_BEGIN_NAMESPACE
class QTreeWidget;
class QTreeWidgetItem;
QT_END_NAMESPACE

class YzjReader
{
public:
    // 在yzjthread.h中有被使用到
//    YzjReader(){}

    YzjReader(QTreeWidget *treeWidget);

    bool ReadYzj(QIODevice *device);

    QString errorString() const;
    //QList<QList<float> > GetValue();// 获取yzj文件中的数值
private:
    void readYZJ();
    void readTitle(QTreeWidgetItem *item);
    void readCategory(QTreeWidgetItem *item);
    void readItem(QTreeWidgetItem *item);
    void readKey(QTreeWidgetItem *item);
    void readRecord(QTreeWidgetItem *item);//y

    QTreeWidgetItem *createChildItem(QTreeWidgetItem *item);

    QXmlStreamReader xml;
    QTreeWidget *treeWidget;

    QIcon folderIcon;
    QIcon bookmarkIcon;

    QList<float> lValue;
    QList<QList<float> > llValue;
};

#endif // YZJREADER_H
